package org.csu.onlineedubackend.model.spark;

import lombok.Data;
import org.csu.onlineedubackend.model.AIChatMessage;

import java.util.List;

@Data
public class SparkResponse {
    private Header header;
    private Payload payload;

    @Data
    public static class Header {
        private Integer code;
        private String message;
        private String sid;
        private Integer status;
    }

    @Data
    public static class Payload {
        private Choices choices;
        private Usage usage;

        @Data
        public static class Choices {
            private Integer status;
            private Integer seq;
            private List<AIChatMessage> text;

            public Integer getStatus() {
                return status;
            }

            public void setSeq(Integer seq) {
                this.seq = seq;
            }

            public List<AIChatMessage> getText() {
                return text;
            }

            public void setText(List<AIChatMessage> text) {
                this.text = text;
            }
        }

        @Data
        public static class Usage {
            private TextUsage text;

            @Data
            public static class TextUsage {
                private Integer question_tokens;
                private Integer prompt_tokens;
                private Integer completion_tokens;
                private Integer total_tokens;
            }
        }
    }
} 